package org.liaohailong.victorlibrary.ui;

import android.os.Bundle;

import androidx.annotation.Nullable;

import org.liaohailong.victorlibrary.R;
import org.liaohailong.victorlibrary.base.BaseActivity;
import org.liaohailong.victorlibrary.dialog.BottomDialog;
import org.liaohailong.victorlibrary.dialog.LoadingDialog;
import org.liaohailong.victorlibrary.dialog.RightDialog;

/**
 * create by liaohailong
 * time 2022/8/23 17:22
 * desc: 演示各式各样弹窗
 */
public class DialogActivity extends BaseActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dialog);

        // 加载底部弹窗
        findViewById(R.id.bottom_btn).setOnClickListener((v) -> {
            new BottomDialog().show(DialogActivity.this);
        });

        // 加载右侧弹窗
        findViewById(R.id.right_btn).setOnClickListener((v) -> {
            new RightDialog().show(DialogActivity.this);
        });

        // 加载等待弹窗
        findViewById(R.id.loading_btn).setOnClickListener((v) -> {
            new LoadingDialog().show(DialogActivity.this);
        });
    }
}
